﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;
using Com.CMS263.DAO;

namespace Com.CMS263.BLL
{
    public class SendDocBLL : BaseBLL<SendDoc>
    {
        public SendDoc entity = new SendDoc();
        SendDocDAO dao = new SendDocDAO();
        public override SendDoc GetModel()
        {
            return entity;
        }

          /// <summary>
        /// 查询发送资料历史
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <param name="userid"></param>
        /// <returns></returns>
        public IList<SendDoc> GetListPaging(int page, int pagesize, int userid)
        {
            return dao.GetListPaging(page, pagesize, userid);
        }

        // <summary>
        /// 查询发送资料历史数量
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <param name="userid"></param>
        /// <returns></returns>
        public int GetListPaging(int userid)
        {
            return dao.GetListPaging(userid);
        }
        /// <summary>
        /// 根据发布信息用户和状态查询任务信息
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <param name="userid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public IList<SendDoc> GetListPaging(int page, int pagesize, int userid, string state, bool isDel)
        {
            return dao.GetListPaging(page, pagesize, userid, state, isDel);
        }
        /// <summary>
        /// 根据发布信息用户和状态查询任务信息条目数
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public int GetListPaging(int userid, string state, bool isDel)
        {
            return dao.GetListPaging(userid, state, isDel);
        }
        /// <summary>
        /// 根据处理意见用户和状态查询任务信息
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <param name="worker"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public IList<SendDoc> GetListPagingByWorker(int page, int pagesize, int worker, string state)
        {
            return dao.GetListPagingByWorker(page, pagesize, worker, state);
        }
        /// <summary>
        /// 根据处理意见用户和状态查询任务信息条目数
        /// </summary>
        /// <param name="worker"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public int GetListPagingByWorker(int worker, string state)
        {
            return dao.GetListPagingByWorker(worker, state);
        }



        /// <summary>
        /// 查询待分发资料
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<SendDoc> GetListPagings(int userid, bool isPub, bool isDel, int page, int pagesize)
        {
            return dao.GetListPagings(userid, isPub, isDel, page, pagesize);
        }


        /// <summary>
        /// 查询待分发资料数量
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public int GetListPagings(int userid, bool isPub, bool isDel)
        {
            return dao.GetListPagings(userid, isPub, isDel);
        }


        // <summary>
        /// 查询已删除资料
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<SendDoc> GetListPagings(int userid,  bool isDel, int page, int pagesize)
        {
            return dao.GetListPagings(userid,  isDel, page, pagesize);
        }


        /// <summary>
        /// 查询已删除资料数量
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public int GetListPagings(int userid,  bool isDel)
        {
            return dao.GetListPagings(userid,  isDel);
        }

        /// <summary>
        /// 批量修改暂存
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public Boolean BatchSendDocUpdate(string ids)
        {
            return dao.BatchSendDocUpdate(ids);
        }

        /// <summary>
        /// 批量修改删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchSendDocDelete(string ids)
        {
            return dao.BatchSendDocDelete(ids);
        }


         /// <summary>
        /// 批量修改暂存
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchSSendDocUpdate(string ids)
        {
           return dao.BatchSSendDocUpdate(ids);
        }

        /// <summary>
        /// 批量修改删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchSSendDocDelete(string ids)
        {
            return dao.BatchSSendDocDelete(ids);
        }
    }
}
